# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#

# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!

set $mod Mod4

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 8

# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8

# Before i3 v4.8, we used to recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesn’t scale on retina/hidpi displays.

# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod

# start a terminal
bindsym $mod+Return exec i3-sensible-terminal

# kill focused window
bindsym $mod+Shift+c kill


# start dmenu (a program launcher)
bindsym $mod+p exec dmenu_run -i -fn "Liberation Mono:regular:pixelsize=13"
# start i3-dmenu-desktop
bindsym $mod+Shift+p exec --no-startup-id i3-dmenu-desktop


# change focus
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

# move focused window
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right


# split in horizontal orientation
bindsym $mod+h split h

# split in vertical orientation
bindsym $mod+v split v

# change container layout (stacked, tabbed, toggle split)
bindsym $mod+n layout stacking
bindsym $mod+m layout tabbed
bindsym $mod+b layout toggle split

# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle

# toggle tiling / floating
bindsym $mod+Shift+space floating toggle

# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle


## focus the parent container
##bindsym $mod+a focus parent
## focus the child container
##bindsym $mod+d focus child


# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10

# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10

# reload the configuration file
bindsym $mod+q reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+q restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+Escape exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"

# resize window (you can also use the mouse for that)
mode "resize" {
        # These bindings trigger as soon as you enter the resize mode

        # Pressing left will shrink the window’s width.
        # Pressing right will grow the window’s width.
        # Pressing up will shrink the window’s height.
        # Pressing down will grow the window’s height.
        bindsym Left resize shrink width 10 px or 10 ppt
        bindsym Down resize grow height 10 px or 10 ppt
        bindsym Up resize shrink height 10 px or 10 ppt
        bindsym Right resize grow width 10 px or 10 ppt

        # back to normal: Enter, Escape, or mod+r
        bindsym Return mode "default"
        bindsym Escape mode "default"
	bindsym $mod+r mode "default"
}

bindsym $mod+r mode "resize"

# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
	colors{
		# Colouring for desktop selector
		background #00000080
		statusline #ffffff
		
		# class             border backgr  text
		focused_workspace  #04f700 #196d13 #ffffff
		##inactive_workspace #545454 #202020 #ffffff
		##active_workspace   #545454 #202020 #ffffff
		urgent_workspace   #ff0000 #700e0e #ffffff
	}
        status_command i3status
}



#########################
#                       #
# Personal Key-Bindings #
#                       #
#########################

# Lock screen
bindsym $mod+l exec light-locker-command -l

# Alternative lock screen
bindsym $mod+Shift+l exec i3lock --image="/home/category/Images/wallpapers/mouthxray.png" -fe

# Screenshot
bindsym $mod+Print exec xfce4-screenshooter



###########
#         #
# Visuals #
#         #
###########

# Only show borders with multiple windows
hide_edge_borders smart

# Window Colouring
# class                 border  backgr. text    indicator child_border
client.focused          #04f700 #196d13 #ffffff #50bf1c   #6de835
client.focused_inactive #333333 #5f676a #ffffff #484e50   #5f676a
client.unfocused        #333333 #222222 #888888 #292d2e   #222222
client.urgent           #ff0000 #700e0e #ffffff #ff0000   #ff0000
client.placeholder      #000000 #0c0c0c #ffffff #000000   #0c0c0c

client.background       #ffffff

# Make urgency hint show for 1 second
force_display_urgency_hint 1000 ms



####################
#                  #
# Floating Windows #
#                  #
####################

# Manual over-rides for windows to set as floating
# Criteria [in brackets] from here https://i3wm.org/docs/userguide.html#command_criteria
# Class/instance info found from "xprop | grep WM_CLASS"

# Thunderbird - various windows
for_window [class="Thunderbird" instance="Mailnews"] floating enable
for_window [class="Thunderbird" instance="Msgcompose"] floating enable

# Filebot pop-ups
for_window [class="net-filebot-Main" title="win1"] floating enable

# Pulse Audio Volume Control
for_window [class="Pavucontrol"] floating enable

# JACK Audio Connection Kit dashboard
for_window [class="qjackctl"] floating enable

# Virtual Keyboard
for_window [class="Vkeybd.tcl" instance="vkeybd.tcl"] floating enable

# jack-keyboard
for_window [class="jack-keyboard"] floating enable

# FluidSynth
for_window [class="FluidSynth-DSSI_gtk"] floating enable



###############
#             #
# Auto starts #
#             #
###############

#Always executed in order:-

# Run custom script to start Compositor for window effects
exec --no-startup-id compton --sw-opti -i 0.85 -f -c -D 3 -b
# Compositor _also_ started from .xsession script...


# Lock screen
exec_always light-locker

# Volume tray app
exec_always volumeicon

# Network tray app
exec_always nm-applet

# Redshift to adjust colour temp depending on time of day
exec redshift-gtk

# Unclutter - hide idle mouse pointer 
exec unclutter -idle 10 -noevents -reset
